#pragma once
#include "IObserver.h"
#include <list>
#include <memory>

class Subject
{
public:
    Subject();
    ~Subject();

    //添加观察者;
    void RegiserObserver(std::shared_ptr<IObserver> pOb);

    //移除观察者;
    void RemoveObserver(std::shared_ptr<IObserver> pOb);

    //发送通知;
    void Notify(QString strStatus);
private:

    //观察者存储列表;
    std::list<std::shared_ptr<IObserver>> m_listObs;

protected:
    //Name;
    QString m_strName;
};

